package com.yyfax.pay.third.model.to.fuiou;

import com.yyfax.framework.model.Params;
import com.yyfax.framework.yyfax.enums.RspCodeEnum;
import com.yyfax.pay.common.exception.YYPayException;
import com.yyfax.pay.third.model.to.fuiou.xml.QueryPayoutReqData;

/**
 * 富友查单 --> 请求参数
 * 
 * @author maojian
 * @date 2016-09-26 10:48:15
 * @since v1.0.0
 */
@SuppressWarnings("serial")
public class QueryPayoutOrderFuiouParams extends Params {
	// Md5(merid+”|”+key+”|”+reqtype+”|”+xml)
	public static final String ENCRYPTSEPERATOR = "|";

	/**
	 * 商户下单、验证码获取接口请求参数封装类
	 */
	private QueryPayoutReqData queryPayoutReqData;
	
	/**
	 * 商户号
	 */
	private String merchantCode;

	/**
	 * 富友平台商户号
	 */
	private String merchantId;

	/**
	 * 商户密钥
	 */
	private String merchantSecurit;
	
	/**
	 * 代付请求url
	 */
	private String url;
	
	/**
	 * 业务类型
	 */
	private String reqType;

	@Override
	public boolean validate() throws Exception {
		if (this.merchantCode == null) {
			throw new YYPayException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "merchantNo参数不能为空");
		}
		if (this.queryPayoutReqData == null) {
			throw new YYPayException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "queryPayoutReqData参数不能为空");
		}
		if (this.merchantId == null) {
			throw new YYPayException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "merchantId参数不能为空");
		}
		if (this.merchantSecurit == null) {
			throw new YYPayException(RspCodeEnum.COMMON_ERROR_PARAMETER_INVALID, "merchantSecurit参数不能为空");
		}
		return false;
	}



	public String getMerchantCode() {
		return merchantCode;
	}



	public void setMerchantCode(String merchantCode) {
		this.merchantCode = merchantCode;
	}


	public QueryPayoutReqData getQueryPayoutReqData() {
		return queryPayoutReqData;
	}


	public void setQueryPayoutReqData(QueryPayoutReqData queryPayoutReqData) {
		this.queryPayoutReqData = queryPayoutReqData;
	}


	public static String getEncryptseperator() {
		return ENCRYPTSEPERATOR;
	}

	public String getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}

	public String getMerchantSecurit() {
		return merchantSecurit;
	}

	public void setMerchantSecurit(String merchantSecurit) {
		this.merchantSecurit = merchantSecurit;
	}


	public String getUrl() {
		return url;
	}


	public void setUrl(String url) {
		this.url = url;
	}


	public String getReqType() {
		return reqType;
	}


	public void setReqType(String reqType) {
		this.reqType = reqType;
	}
		
}
